<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <link rel="stylesheet" href="css.css">
  <title>这会不会变呢</title>
</head>
<body>

  <div class="box">
	  <a data-href="index3.html">asds</a>
  </div>
   <div class="box">
	  <a data-href="index3.html">asds</a>
  </div>

	<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  	<script src="jquery.pjax.js"></script>
  	<script>

  	$(document).on('click', 'a', function(event) {
  		var url = $(this).data('href');
		$.get(url,function(a){
			window.history.pushState({}, '', url)
			$('.box').eq(1).html($(a)[9]).css('left', '0').after('<div class="box"></div>')
			$('.box').eq(0).animate({'opacity': 0}, 500,function(){$(this).remove()})
			setTimeOut(function(){
				$('.box').eq(0).remove();
			},500)
		})
  	}) 

	/*$.get('index.html',function(a){
		window.history.pushState({}, '', 'index.html')
		$('.box').html($(a)[9])
	})*/
  	

  </script>
</body>
</html>
